package com.zl.entity;

import lombok.Data;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Objects;
import java.util.Set;

@Data
public class TsRole implements Serializable {


    private Long id;

    private String name;

    private String dataScope = "本级";

    private Integer level = 3;

    private String remark;

    private Set<TsUser> users;

    private Set<TsPermission> permissions;

    private Set<TsMenu> menus;

//    private Set<TsDept> depts;

    private Timestamp createTime;

    @Override
    public String toString() {
        return "Role{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", remark='" + remark + '\'' +
                ", createDateTime=" + createTime +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TsRole role = (TsRole) o;
        return Objects.equals(id, role.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }

    public interface Update{}
}
